# coding: utf-8
"""
@python version : python3.10
@file name      : quickstart.py
@date           : 2024/5/13 15:22
@author         : ziyang.yang@aliyun.com
@gitee          : https://gitee.com/ziyangyang1318
@blog           : www.yangziyang.top
@describe       : 
"""
from fastapi import FastAPI
import uvicorn

app = FastAPI()


# 异步
@app.get("/")
async def index():
    return {'name': 'yzy'}


# 启动 uvicorn.exe quickstart:app --reload

if __name__ == '__main__':
    file_name = __file__.split(".")[0].split('\\')[-1]
    uvicorn.run(f'{file_name}:app', port=8000, reload=True)
